import request from "@/utils/request";

// 字典类型列表
export function dictTypeLists(params?: any) {
  return request.post({ url: "/system/dict/type/list", params });
}

/**
 * 根据多个字典类型查询字典值
 * @param params  数组
 * @returns
 */
export function dictDataByTypes(params?: any) {
  return request.post({ url: "/system/dict/data/type/dictTypes", params });
}

/**
 * 获取字典数据 树形
 * @param params
 * @returns
 */
export function getDictTreeData(params?: any) {
  return request.get({ url: "/system/dict/type/getDictTreeData", params });
}

// 字典类型列表
export function dictTypeAll(params?: any) {
  return request.get({ url: "/setting/dict/type/all", params });
}

// 添加字典类型
export function dictTypeAdd(params: any) {
  return request.post({ url: "/system/dict/type/add", params });
}

// 编辑字典类型
export function dictTypeEdit(params: any) {
  return request.post({ url: "/system/dict/type/edit", params });
}

// 删除字典类型
export function dictTypeDelete(params: any) {
  return request.post({ url: "/system/dict/type/del", params });
}

// 字典数据列表
export function dictDataLists(params: any) {
  return request.get({ url: "/system/dict/data/list", params });
}

// 添加字典数据
export function dictDataAdd(params: any) {
  return request.post({ url: "/system/dict/data", params });
}

// 编辑字典数据
export function dictDataEdit(params: any) {
  return request.post({ url: "/system/dict/data/edit", params });
}

// 删除字典数据
export function dictDataDelete(params: any) {
  return request.post({ url: "/system/dict/data/del", params });
}
